package musicstore;

import musicstore.dao.AlbumDao;
import musicstore.entity.Album;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class test {
	public static void main(String[] args) {
		ApplicationContext atx = new ClassPathXmlApplicationContext("beans.xml");
		/*ShoppingCartDao dao = (ShoppingCartDao)atx.getBean("shoppingCartDao");
		ShoppingCart cart = new ShoppingCart();
		dao.addItemToCart(cart, 1);
		if(u != null)
			System.out.println("exists");
		else
			System.out.println("not exist");*/
		AlbumDao dao = (AlbumDao)atx.getBean("albumDao");
		Album a = dao.getAlbumById(22);
		System.out.println(a.getTitle());
		
		
	}
}
